//
//  ViewController.m
//  zyh
//
//  Created by blue on 15-11-3.
//  Copyright (c) 2015年 blue. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor=[UIColor redColor];
    UILabel * l = [[UILabel alloc]initWithFrame:CGRectMake(50, 200, 100, 50)];
    l.text=@"你好，世界";
    l.textColor=[UIColor greenColor];
    [self.view addSubview:l];
    for(int i=0;i<5;i++)
    {
        UIView * v=[[UIView alloc]initWithFrame:CGRectMake(20+i*50+i*8,50,50,50)];
        v.backgroundColor=[UIColor yellowColor];
        [self.view addSubview:v];
    }
    
    
    UIView * view=[[UIView alloc]initWithFrame:CGRectMake(20, 200, 200, 200)];
    view.layer.borderWidth=2;
    view.clipsToBounds=YES;
    [self.view addSubview:view];
    
    UIView * yuan = [[UIView alloc]initWithFrame:CGRectMake(100, 0,200, 200)];
    yuan.layer.cornerRadius=100;
    yuan.layer.borderWidth=2;
    [view addSubview:yuan];
    
    UIView * linel=[[UIView alloc]initWithFrame:CGRectMake(0, 99, 200, 2)];
    linel.backgroundColor=[UIColor blackColor];
    [view addSubview:linel];
    
    UIView * linel2=[[UIView alloc]initWithFrame:CGRectMake(99, 0, 2, 200)];
    linel2.backgroundColor=[UIColor blackColor];
    [view addSubview:linel2];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
